﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserReferrer.aspx.cs" Inherits="User_UserReferrer" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <title>修改邀请人</title>
    <link href="../../css/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../../css/admin.css" rel="stylesheet" />
    <script src="../../js/jquery-1.7.2.min.js"></script>
    <script src="../../css/assets/js/bootstrap.min.js"></script>
    <link href="../../Css/main.css" rel="stylesheet" />
    <style>
        body {
            background: #ffffff;
            color: #444;
            font-size: 12px;
        }

        #form1 {
            padding-left: 50px;
            padding-right: 50px;
        }

            #form1 div.row {
                margin-top: 10px;
                margin-bottom: 10px;
                border: #eee solid 4px;
                padding: 20px;
            }

        .add {
            padding-left: 25px;
        }

    </style>
</head>
<body>
    <form id="form1" runat="server">

        <div class="row">
            
          <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                <span class="txtWarn">*</span> 输入手机号：                
                    <br />
               
              <asp:TextBox ID="txtMobilePhone" runat="server" CssClass="txtSize" ></asp:TextBox>
          </div>
       
           <br /> <br />
         <div class="mi_TitleLeft" style="text-align:center;">
<%--            <img src="class" class="mi_TitleImg"  runat="server" id="HeadImg" alt="" style="width:150px;height:150px;border-radius:50%"/>--%>
             <asp:Image ID="HeadImg" runat="server" CssClass ="mi_TitleImg"   style="width:150px;height:150px;border-radius:50%"/>
              <br /><br />
            <label id="WXname" style="font-size:15px;"></label>
         </div>
       <br /> <br />  
        <div style="text-align:center;">         
          <asp:Button runat="server" ID="btnOK" Text="确定" CssClass="btn btn-primary btnSize" OnClick="btnOK_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
          <asp:Label runat="server" CssClass="txtWarn" ID="lblWarn"></asp:Label>
        </div>

       </div>
    </form>
</body>
</html>
<script>
    //function Update() {
    //    if ($("#txtMobilePhone").val().length == 11) {
    //        $.ajax({
    //            type: "Post", //提交方式
    //            url: "../Ajax/ajax_UpdateReferrer.aspx",//获取数据的函数
    //            data: { "MobilePhone": $("#txtMobilePhone").val() }, //参数
    //            error: function () {
    //                setContainer('ERROR!');
    //            },
    //            success: function (data) {
    //                var jsonData = eval("(" + data + ")");
    //                $("#HeadImg").attr("src", jsonData.HeadPortrait);
    //                $("#WXname").html(jsonData.WeiXinName);
    //            }                
    //        });
    //    }
    //}
    $("#txtMobilePhone").keyup(function () {
        if ($("#txtMobilePhone").val().length == 11) {
            $.ajax({
                type: "Post", //提交方式
                url: "../Ajax/ajax_UpdateReferrer.aspx",//获取数据的函数
                data: { "MobilePhone": $("#txtMobilePhone").val() }, //参数
                success: function (data) {
                    var jsonData = eval("(" + data + ")");
                    $("#HeadImg").attr("src", jsonData.HeadPortrait);
                    $("#WXname").html(jsonData.WeiXinName);
                },
                error: function () {
                setContainer('ERROR!');
            }

            });
        }
    })
</script>